﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SharingCenter.Web.Classes.Events;

namespace SharingCenter.Web.Shared
{
    public partial class EventMemberList : System.Web.UI.UserControl
    {
        public string CssClass { get; set; }
        public Guid EventId { get; set; }


        void Page_PreRender(object sender, EventArgs e)
        {
            pnMemberList.CssClass = this.CssClass;
        }

        void Page_Init(object sender, EventArgs e)
        {
            ldsMembers.Selecting += new EventHandler<LinqDataSourceSelectEventArgs>(ldsMembers_Selecting);
            ldsMembers.Selected += new EventHandler<LinqDataSourceStatusEventArgs>(ldsMembers_Selected);
        }

        void ldsMembers_Selected(object sender, LinqDataSourceStatusEventArgs e)
        {
            
        }

        void ldsMembers_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            //e.WhereParameters["EventId"] = this.EventId;
            e.Result = EventOperations.GetParticipantList(EventId, -1);
        }
    }
}